export default {
  setUserRole: (state, info) => {
    state.userInfo.role = info
  },
  setUID: (state, info) => {
    state.userInfo.uid = info
  },
  setProjectInfo: (state, info) => {
    state.projectInfo = info
  },
  setProjectList: (state, list) => {
    state.projectList = list
  },
  clearProjectInfo: (state) => {
    state.projectInfo = null
  },
  // 树页面的数据缓存-start
  // 存储树数据
  storage_tree_fun(state, info) {
    if (info) {
      state.tree_id = info.id
      state.tree_data = info.data
    }
  },
  // 树页面的数据缓存-end

  // 退出系统清理数据
  clearLocalData: state => {
    state.projectInfo = null
  }
}
